<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html class="ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
  <head>
  	<meta charset="utf-8" />

  	<!-- Uncomment to make IE8 render like IE7 -->
  	<!-- <meta http-equiv="X-UA-Compatible" content="IE=7" /> -->

  	<!-- Set the viewport width to device width for mobile -->
  	<meta name="viewport" content="width=device-width, initial-scale=1.0" />

  	<title><%= content_for?(:title) ? yield(:title) : "Blog Site" %></title>

  	<%= stylesheet_link_tag    "application" %>
  	<%= javascript_include_tag "vendor/custom.modernizr" %>
    <%= csrf_meta_tags %>
  </head>

  <body>
      <nav class="top-bar">
          <ul class="title-area">
              <li class="name">
                <h1><%= link_to 'WEB SITE', root_path %></h1>
              </li>
          </ul>
          <section class="top-bar-section">
            <ul class="right">
                <% if signed_in? %>
                    <li><%= link_to 'LOGOUT', session_path(session[:user_id]), method: :delete %></li>
                <% else %>
                    <li><%= link_to 'LOGIN', new_session_path %></li>
                    <li><%= link_to 'REGISTER', new_user_path %></li>
                <% end %>
            </ul>
          </section>
          </nav>
          <div class="row">
              <div class="large-3 columns">
                  <% if signed_in? %>
                      <p>Welcome,  <%= current_user.name %></p>
                      <ul class="side-nav">
                          <li><%= link_to "List Users", users_path %></li>
                          <li class="divider"></li>
                          <li><%= link_to "Blogs", blogs_path %></li>
                      </ul>
                  <% end %>
              </div>
              <div class="large-9 columns">
                  <%= yield %>
              </div>
          </div>
          <%= javascript_include_tag "application" %>
      </body>
  </html>
